Welcome![Sign In][Sign Up]
Location:
Search - gif c

Search list

[Graph programGIF的C语言解码程序.zip

Description:
Platform: | Size: 4770 | Author: | Hits:

[ASPX.NETASPX图片上传(水印、缩略图、远程保存)源码

Description:
很实用的一个图片上传得例子
图片上传:生成缩略图 加文字水印 图片水印
51aspx.png为水印图片
远程图片抓取(保存到本地)支持jpg、gif、bmp、png
图片抓取后自动以Auto+日期+原名称命名
输入远程图片地址(支持Html)

Platform: | Size: 489130 | Author: Simonz | Hits:

[Internet-Network用Java编写HTML文件分析程序

Description:

Java编写HTML文件分析程序

 一、概述

    

    Web服务器的核心是对Html文件中的各标记(Tag)作出正确的分析,一种编程语言的解释程序也是对源文件中的保留字进行分析再做解释的。实际应用中,我们也经常会碰到需要对某一特定类型文件进行要害字分析的情况,比如,需要将某个HTML文件下载并同时下载与之相关的.gif.class等文件,此时就要求对HTML文件中的标记进行分离,找出所需的文件名及目录。在Java出现以前,类似工作需要对文件中的每个字符进行分析,从中找出所需部分,不仅编程量大,且易出错。笔者在近期的项目中利用Java的输入流类StreamTokenizer进行HTML文件的分析,效果较好。在此,我们要实现从已知的Web页面下载HTML文件,对其进行分析后,下载该页面中包含的HTML文件(假如在Frame中)、图像文件和ClassJava Applet)文件。

    

    二、StreamTokenizer

    

    StreamTokenizer即令牌化输入流的作用是将一个输入流中变成令牌流。令牌流中的令牌实体有三类:单词(即多字符令牌)、单字符令牌和空白(包括JavaC/C++中的说明语句)。

    

    StreamTokenizer类的构造器为: StreamTokenizer(InputStream in)

    

    该类有一些公有实例变量:ttypesvalnval ,分别表示令牌类型、当前字符串值和当前数字值。当我们需要取得令牌(即HTML中的标记)之间的字符时,应访问变量sval。而读向下一个令牌的方法是调用nextToken()。方法nextToken()的返回值是int型,共有四种可能的返回:

    

    StreamTokenizer.TT_NUMBER: 表示读到的令牌是数字,数字的值是double型,可以从实例变量nval中读取。

    

    StreamTokenizer.TT_Word: 表示读到的令牌是非数字的单词(其他字符也在其中),单词可以从实例变量sval中读取。

    

    StreamTokenizer.TT_EOL: 表示读到的令牌是行结束符。

    

    假如已读到流的尽头,则nextToken()返回TT_EOF

    

    开始调用nextToken()之前,要设置输入流的语法表,以便使分析器辨识不同的字符。WhitespaceChars(int low, int hi)方法定义没有意义的字符的范围。WordChars(int low, int hi)方法定义构造单词的字符范围。

    

    三、程序实现

    

    1HtmlTokenizer类的实现

    

    对某个令牌流进行分析之前,首先应对该令牌流的语法表进行设置,在本例中,即是让程序分出哪个单词是HTML的标记。下面给出针对我们需要的HTML标记的令牌流类定义,它是StreamTokenizer的子类:

    

    

    import java.io.*;

    import java.lang.String;

    class HtmlTokenizer extends

    StreamTokenizer {

    //定义各标记,这里的标记仅是本例中必须的,

    可根据需要自行扩充

     static int HTML_TEXT=-1;

     static int HTML_UNKNOWN=-2;

     static int HTML_EOF=-3;

     static int HTML_IMAGE=-4;

     static int HTML_FRAME=-5;

     static int HTML_BACKGROUND=-6;

     static int HTML_APPLET=-7;

    

    boolean outsideTag=true; //判定是否在标记之中

    

     //构造器,定义该令牌流的语法表。

     public HtmlTokenizer(BufferedReader r) {

    super(r);

    this.resetSyntax(); //重置语法表

    this.wordChars(0,255); //令牌范围为全部字符

    this.ordinaryChar('< '); //HTML标记两边的分割符

    this.ordinaryChar('>');

     } //end of constrUCtor

    

     public int nextHtml(){

    int token; //令牌

    try{

    switch(token=this.nextToken()){

    case StreamTokenizer.TT_EOF:

    //假如已读到流的尽头,则返回TT_EOF

    return HTML_EOF;

    case '< ': //进入标记字段

    outsideTag=false;

    return nextHtml();

    case '>': //出标记字段

    outsideTag=true;

    return nextHtml();

    case StreamTokenizer.TT_WORD:

    //若当前令牌为单词,判定是哪个标记

    if (allWhite(sval))

     return nextHtml(); //过滤其中空格

    else if(sval.toUpperCase().indexOf("FRAME")

    !=-1 && !outsideTag) //标记FRAME

     return HTML_FRAME;

    else if(sval.toUpperCase().indexOf("IMG")

    !=-1 && !outsideTag) //标记IMG

     return HTML_IMAGE;

    else if(sval.toUpperCase().indexOf("BACKGROUND")

    !=-1 && !outsideTag) //标记BACKGROUND

     return HTML_BACKGROUND;

    else if(sval.toUpperCase().indexOf("APPLET")

    !=-1 && !outsideTag) //标记APPLET

     return HTML_APPLET;

    default:

    System.out.println ("Unknown tag: "+token);

    return HTML_UNKNOWN;

     } //end of case

    }catch(IOException e){

    System.out.println("Error:"+e.getMessage());}

    return HTML_UNKNOWN;

     } //end of nextHtml

    

    protected boolean allWhite(String s){//过滤所有空格

    //实现略

     }// end of allWhite

    

    } //end of class

    

    以上方法在近期项目中测试通过,操作系统为Windows NT4,编程工具使用Inprise Jbuilder3


Platform: | Size: 1066 | Author: tiberxu | Hits:

[Other resourcepaintlib-2.5.0

Description: paintlib是一个可移植的用于图像加载、保存和处理的C++类库。可从BMP, GIF, JPEG, PCX, PGM, PICT, PNG, PSD, TGA, TIFF和WMF文件中加载图像,且可保存为BMP, JPEG, PNG和TIFF格式。既可通过在过滤器类中执行过滤, 也可通过直接访问位图来进行图像处理。提供了完整的C++源码。-paintlib is a transplant can be used to image loading, storage and handling of the C library. From BMP, GIF, JPEG, PCX, PGM, PICT, PNG, PSD, TGA, TIFF, and WMF files to load images and the retention of BMP, JPEG, PNG and TIFF formats. Both filters through the implementation of category filters, are also available via direct access to Bitmap image processing. For a complete C source code.
Platform: | Size: 1078529 | Author: 宁华锋 | Hits:

[GDI-BitmapIlib-1.1.9-min.tar

Description: What is it? Ilib is a library (and some tools and examples) written in C that can read, create, manipulate and save images. It is capable of using X11 BDF fonts for drawing text. (X11 BDF fonts are part of the UNIX-based X11 Windows System, original developed at MIT in the early 1990s.) That means you get lots (208, to be exact) of fonts to use. You can even create your own if you know how to create an X11 BDF font. It can read and write PPM, XPM, GIF, PNG and JPG image format. -What is it Ilib is a library (and some tools and examples) written in C that can read, create, manipulate and save images. It is capable of using X11 BDF fonts for drawing text. (X11 BDF fonts are part of the UNIX-based X11 Windows System, original developed at MIT in the early 1990s.) That means you get lots (208, to be exact) of fonts to use. You can even create your own if you know how to create an X11 BDF font. It can read and write PPM, XPM, GIF, PNG and JPG image format.
Platform: | Size: 130922 | Author: fwx | Hits:

[Dialog_Window创建分层窗口实现图像渐变

Description: 1、有没有方法创建一个半透明的窗口,并将该窗口上发生的所有鼠标事件都传递到桌面或另一个应用窗口处理? 2、我正在写一个幻灯显示程序,该程序要显示JPEG图像序列。我使用了 2002年三月刊专栏文章中的 CPicture 类来绘制图像(参见:C++ Q&A: Do You Have a License for that GIF? PreSubclassWindow, EOF in MFC, and More)。那个程序运行得很好。但我现在想添加从某一张图像到下一张图像的渐变特性。我在网页中用转换效果可以做到。那么是否有办法从程序代码中实现图像渐变特性? -one, is there a way to create a translucent window, the window will be on all the mouse events are delivered to the desktop or another application window? 2, I was writing a slide show program, which is to show JPEG image sequence. I use the 2002 monthly column 3 of CPicture class mapping images (see : C QA : Do You Have a License for that GIF PreSubclassWindow, EOF in MFC, and More). That program runs very well. But now I want to add one from a certain image to the image under a transitional feature. I used the website conversions can be done. So if there is any way from the code graded Image characteristics?
Platform: | Size: 203539 | Author: 杨飞 | Hits:

[Graph programdgif_lib

Description: Gif解码程序库,代码质量不错的。采用C语言编写。-Gif decoding libraries, code quality good. Using C language.
Platform: | Size: 6568 | Author: 石代奎 | Hits:

[Other resourceDosImageprocess

Description: dos下用c实现图像的处理,可处理bmp,pcx,gif等格式的显示和简单的特效处理。-dos c achieve using image processing, handling bmp, nil, gif format display and simple effects processing.
Platform: | Size: 218436 | Author: 冯磊 | Hits:

[Special EffectsWinImageprocess

Description: windows下实现对各种格式图像的处理,用c++实现对bmp,jepg,gif等格式图像的处理及特效的算法。-windows under a variety of formats for image processing, c achieve right bmp, jepg, gif format image processing algorithms and special effects.
Platform: | Size: 54947 | Author: 冯磊 | Hits:

[Game Programdos_gameboy-0.8.8

Description: gameboy游戏模拟器,COMMON.H CONV.C DASM.C DEBUG.C FILE_ID.DIZ FMFREQS.C FMFREQS.H GB.C GB.H GBLIST.C HELP.H IBMADLIB.C IBMASM.S IBMGIF.C IBMMSDOS.C IBMMSDOS.H IBMSB.C IBMSTACK.C KEYS.C LISTALL.C MAKEFILE TABLES.H TESTALL.C VGB-DOS.GIF VGB-DOS.TXT VGB.C Z80.C Z80.H -gameboy game consoles, COMMON.H CONV.C DASM.C DEBUG.C FILE_ID.DIZ FM FREQS.C FMFREQS.H GB.C GB.H GBLIST.C HELP.H IB MADLIB.C IBMASM.S IBMGIF.C IBMMSDOS.C IBMMSD OS.H IBMSB.C IBMSTACK.C KEYS.C LISTALL.C MAKE FILE TABLES.H TESTALL.C VGB - DOS.GIF VGB-DOS. TXT VGB.C Z80.C Z80.H
Platform: | Size: 73199 | Author: xjjxing | Hits:

[Other resourceWATCOMCforGIF

Description: 用watcom c显示GIF图像格式 用watcom c显示GIF图像格式-with Watcom c shows GIF format images with Watcom c shows GIF format images
Platform: | Size: 6165 | Author: 乔凯 | Hits:

[Other resourcepaintlib-2.6.2

Description: paintlib is a portable C++ class library for image loading, saving and manipulation. Images can be loaded from BMP, GIF, IFF, JPEG, PCX, PGM, PICT, PNG, PSD, SGI, TGA, TIFF and WMF files and saved in BMP, JPEG, PNG and TIFF formats-paintlib portable is a class library for C i MAGE loading, saving and manipulation. Images can be loaded f rom BMP, GIF, IFF, JPEG, PCX, PGM, PICT, PNG, PSD, SGI, TGA, TIFF, and WMF files and saved in BMP, JPEG, PNG and TIFF formats
Platform: | Size: 1919948 | Author: 张海东 | Hits:

[Other resourceGIF_code

Description: 这是一个关于GIF图片文件格式的C语言解码程序-This is a GIF image files on the C language format decoding procedures
Platform: | Size: 5083 | Author: njgwx | Hits:

[Windows Develop576

Description: CxImage is a C++ class to load, save, display, transform BMP, JPEG, GIF, PNG, TIFF, MNG, ICO, PCX, TGA, WMF, WBMP, JBG, J2K images.-CxImage is a C class to load, save, display, transform BMP, JPEG, GIF, PNG, TIFF, MNG, ICO, PCX, TGA, WMF, WBMP, JBG, J2K images.
Platform: | Size: 590795 | Author: 小郑 | Hits:

[Picture Viewershow-picture-jpg-or-gif--with-cPP

Description: 使用c++显示jpg或者gif格式图片,内含一个按钮一个编辑框。-Use c++ display jpg or gif format images, an edit box containing a button.
Platform: | Size: 2817024 | Author: zhengnan | Hits:

[Industry researcho-c-r-p

Description: OCR swing project which is used to detect OCR gif file-OCR swing project which is used to detect OCR gif file
Platform: | Size: 9355264 | Author: arun | Hits:

[ELanguageGIF

Description: Example of a GIF image in visual c#
Platform: | Size: 33792 | Author: Dark | Hits:

[DirextXgif-h-master

Description: gif-h-master是c++操作gif文件的头文件,可以把N个图片合成gif文件-gif-h-master is operating gif file c++ header files, you can put the N image synthesis gif file
Platform: | Size: 9216 | Author: yaoxiong | Hits:

[CSharpGif

Description: c#生成gif示例代码, c#生成gif示例代码,-GIF DEMO
Platform: | Size: 147456 | Author: sualtring | Hits:

[Special EffectsLSB算法-图片信息隐藏

Description: 基于LSB算法实现图片信息隐藏,图片类型包括png、gif、bmp,可写入的文件类型为jpg、png、gif图片以及txt、exe文件等。(Image information hiding based on the LSB algorithm, the picture types include png, gif, bmp, writable file types are jpg, png, gif pictures, txt and exe files.)
Platform: | Size: 10856448 | Author: 启明jun | Hits:
« 1 2 3 4 5 6 7 89 10 11 12 13 ... 18 »

CodeBus www.codebus.net